package com.blacksheep.mtm.dao;

import com.blacksheep.mtm.dto.MedicineItemDto;
import com.blacksheep.mtm.dto.OrderItemDto;
import com.blacksheep.mtm.pojo.manager.TbOrderItem;
import com.blacksheep.mtm.pojo.manager.TbOrderItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TbOrderItemMapper {
    long countByExample(TbOrderItemExample example);

    int deleteByExample(TbOrderItemExample example);

    int deleteByPrimaryKey(String id);

    int insert(TbOrderItem record);

    int insertSelective(TbOrderItem record);

    List<TbOrderItem> selectByExample(TbOrderItemExample example);

    TbOrderItem selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") TbOrderItem record, @Param("example") TbOrderItemExample example);

    int updateByExample(@Param("record") TbOrderItem record, @Param("example") TbOrderItemExample example);

    int updateByPrimaryKeySelective(TbOrderItem record);

    int updateByPrimaryKey(TbOrderItem record);

    int insertList(@Param("list") List<TbOrderItem> list,@Param("orderId")String orderId);

    List<OrderItemDto> selectList(@Param("search") String search, @Param("minDate") String minDate,
                                  @Param("maxDate") String maxDate, @Param("orderCol") String orderCol,
                                  @Param("orderDir") String orderDir);

    List<MedicineItemDto> selectMedicinListByOrder(String orderId);

    TbOrderItem selectByMedicineAndOrder(@Param("orderId") String orderId,@Param("itemId") Integer itemId);
}